<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>登录失败</title>
</head>
<body>
  <h3>{{msg}}</h3>
  <div id="Time">5</div>
  <hr>
  <a href="/admin/login">返回登录页面</a>
  <script>
    //使用匿名函数方法
    function countDown(){
      var time = document.getElementById("Time");
      //alert(time.innerHTML);
      //获取到id为time标签中的内容，现进行判断
      if(time.innerHTML == 0){
        //等于0时清除计时
        window.location.href="/admin/login";
      }else{
        time.innerHTML = time.innerHTML-1;
      }
    }
    //1000毫秒调用一次
    window.setInterval("countDown()",500);
  </script>

  

</body>
</html>